package com.matrix.index.respository

import com.matrix.basecore.constant.Constant
import com.matrix.basecore.net.RetrofitBuilder
import com.matrix.basecore.net.WallpaperResultData
import com.matrix.index.ui.anime.bean.MoHuBean
import com.matrix.index.ui.home.apiService.WallpaperService
import com.matrix.index.ui.home.bean.BingImage
import com.matrix.index.ui.home.bean.JuheJoke
import com.matrix.index.ui.home.bean.WallpaperBean

object WallpaperResp {

    private var mService: WallpaperService =
        RetrofitBuilder.initRetrofit().getService(WallpaperService::class.java)

//    private fun getService(): WallpaperService {
//        return RetrofitBuilder.initRetrofit().getService(WallpaperService::class.java)
//    }


    /**
     * 获取壁纸
     */
    suspend fun getHotNewWallpaper(
        limit: Int,
        skip: Int,
        adult: Boolean,
        first: Int,
        order: String
    ): WallpaperResultData<WallpaperBean> {
        return mService.agentInfo(limit, skip, adult, first, order)
    }

    /**
     * 必应壁纸
     */
    suspend fun bingImage(): BingImage{
        return mService.bingImage("js",0,7)
    }

    /**
     * joke
     */
    suspend fun juheJoke(): JuheJoke{
        return mService.juheJoke(Constant.JUHEAPPKEY)
    }

    /**
     * animWallpaper
     */
    suspend fun animWallpaper(id:String,num:Int): MoHuBean {
        return mService.animWallpaper(id,num,"mw1024")
    }

}